export const getLocation = function() {
  return new Promise((resolve, reject) => {
    let myCity = new BMap.LocalCity();
    myCity.get((result) => {
      let geoc = new BMap.Geocoder();
      geoc.getLocation(result.center, (rs) => {
        let result = {
          address: rs.address,
          lng: rs.point.lng,
          lat: rs.point.lat
        }
        resolve(result);
      });
    }, {enableHighAccuracy: true});
  });
}